package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * DcLogModDet generated by hbm2java
 */
@Entity
@Table(name = "DC_LOG_MOD_DET", schema = "EDADEPUDOC")
public class DcLogModDet implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6003469342073436689L;
	private DcLogModDetId id;
	private DcLogModifica dcLogModifica;
	private String snombreColumna;
	private String svalorAnterior;
	private String svalorActual;
	private String ccasilla;

	public DcLogModDet() {
	}

	public DcLogModDet(DcLogModDetId id, DcLogModifica dcLogModifica,
			String snombreColumna) {
		this.id = id;
		this.dcLogModifica = dcLogModifica;
		this.snombreColumna = snombreColumna;
	}

	public DcLogModDet(DcLogModDetId id, DcLogModifica dcLogModifica,
			String snombreColumna, String svalorAnterior, String svalorActual,
			String ccasilla) {
		this.id = id;
		this.dcLogModifica = dcLogModifica;
		this.snombreColumna = snombreColumna;
		this.svalorAnterior = svalorAnterior;
		this.svalorActual = svalorActual;
		this.ccasilla = ccasilla;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "iindice", column = @Column(name = "I_INDICE", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "ncorrelativo", column = @Column(name = "N_CORRELATIVO", nullable = false, precision = 5, scale = 0)),
			@AttributeOverride(name = "ncorrelCampos", column = @Column(name = "N_CORREL_CAMPOS", nullable = false, precision = 5, scale = 0)) })
	public DcLogModDetId getId() {
		return this.id;
	}

	public void setId(DcLogModDetId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "I_INDICE", referencedColumnName = "I_INDICE", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "N_CORRELATIVO", referencedColumnName = "N_CORRELATIVO", nullable = false, insertable = false, updatable = false) })
	public DcLogModifica getDcLogModifica() {
		return this.dcLogModifica;
	}

	public void setDcLogModifica(DcLogModifica dcLogModifica) {
		this.dcLogModifica = dcLogModifica;
	}

	@Column(name = "S_NOMBRE_COLUMNA", nullable = false, length = 20)
	public String getSnombreColumna() {
		return this.snombreColumna;
	}

	public void setSnombreColumna(String snombreColumna) {
		this.snombreColumna = snombreColumna;
	}

	@Column(name = "S_VALOR_ANTERIOR", length = 100)
	public String getSvalorAnterior() {
		return this.svalorAnterior;
	}

	public void setSvalorAnterior(String svalorAnterior) {
		this.svalorAnterior = svalorAnterior;
	}

	@Column(name = "S_VALOR_ACTUAL", length = 100)
	public String getSvalorActual() {
		return this.svalorActual;
	}

	public void setSvalorActual(String svalorActual) {
		this.svalorActual = svalorActual;
	}

	@Column(name = "C_CASILLA", length = 3)
	public String getCcasilla() {
		return this.ccasilla;
	}

	public void setCcasilla(String ccasilla) {
		this.ccasilla = ccasilla;
	}

}
